package core.api.offer;

import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;

import core.datamodel.AccountData;
import core.datamodel.Element;
import core.datamodel.ElementValue;
import core.datamodel.Event;
import core.datamodel.Resource;
import core.datamodel.ResourceCounter;

public abstract class OfferDefinition {
	private String keyName;

	
	public OfferDefinition (String keyName) {
		this.keyName = keyName;
	}
	
	public String getKeyName() {
		return keyName;
	}
	
	public abstract AccountData calculate(Resource resource, Date startTime, long interval );

	public abstract boolean isUsageRequired();
	
	public abstract boolean isEventRequired();
	
	protected ResourceCounter createCounter(String name){
		ResourceCounter counter = new ResourceCounter();
		counter = new ResourceCounter();
		counter.setCounterName(name);
		counter.setNewCounter(true);
		counter.setCounterValue((float) 0);
		return counter;
	}
	
	
	

	
	

}
	
